Square root extractor

ABSTRACT

A square root extractor includes only multipliers, summers, delay elements, and a scaler so that the square root of a signal may be produced without complex computations.

TECHNICAL FIELD OF THE INVENTION

[0001] The present invention relates in general to an arrangement for producing an output signal which is the square root of an input signal.

BACKGROUND OF THE INVENTION

[0002] A wide variety of applications require the use of a square root extractor. For example, at least some electric-force-balance instruments are non-linear devices used to measure various physical phenomena. Such instruments typically develop an internal restoring force which is proportional to the square of an applied analog control signal. The analog control signal is usually provided by a digital controller, which supplies a digital command signal, and a digital-to-analog converter (DAC), which converts the digital command signal to an analog command signal. This analog command signal is supplied to a driver which provides the analog control signal to the electric-force-balance instrument.

[0003] As suggested by the above, the response of the electric-force-balance instrument varies as the square of the amplitude of the control signal. Accordingly, the response of the electric-force-balance instrument is non-linear with respect to its input control signal. Because of this non-linearity, linear control algorithms cannot be used directly to control the electric-force-balance instrument. Instead, such linear control algorithms must incorporate additional processing which linearizes the response of the instrument, thereby adding extra cost and complexity to the electric-force-balance instrument.

[0004] The present invention, therefore, is directed to an arrangement for providing an output signal that has an amplitude which is proportional to the square-root of the amplitude of an input signal. This arrangement is advantageous because it permits the direct use of linear control algorithms to control instruments having non-linear responses.

SUMMARY OF THE INVENTION

[0005] In accordance with one aspect of the present invention, an apparatus comprises a sign extractor, a delay, a square root extractor, and a sign restorer. The sign extractor has an input and first and second outputs. The input of the sign extractor receives an input signal, the first output provides a sign of the input signal, and the second output provides a magnitude of the input signal. The delay is coupled to the first output, and the delay imposes a delay on the sign. The square root extractor is coupled to the second output. The square root extractor has an output that provides an output signal, and the output signal is an approximation to a square root of the magnitude of the input signal. The sign restorer is coupled to the output of the square root extractor and to the delay. The sign restorer applies the sign from the delay to the output signal from the square root extractor.

[0006] In accordance with another aspect of the present invention, a square root extractor consists of multiplying, summing, scaling, and delaying functions.

[0007] In accordance with yet another aspect of the present invention, a square root extractor comprises first, second, and third multipliers, first and second summers, first and second delays, and a scaler. The first multiplier has a first input coupled to receive a signal whose square root is to be extracted and a second input coupled to an output of the third multiplier. The first summer has a first input coupled to an output of the first multiplier and a second input coupled to an output of the first delay. The scaler has an input coupled to an output of the first summer and an output coupled to an input of the first delay. The output of the first delay provides an output of the square root extractor. The second multiplier has a first input coupled to the output of the first delay and a second input coupled to the output of the second delay. The second summer has a first input coupled to an output of the second multiplier and a second input coupled to a constant. The third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the second delay. The second delay has an input coupled to the output of the third multiplier.

[0008] In accordance with still another aspect of the present invention, a method comprises the following: multiplying first and second signals to produce a third signal, wherein the first signal is a signal whose square root is to be extracted; summing the third signal and a fourth signal to produce a fifth signal; scaling the fifth signal to produce a sixth signal; delaying the sixth signal to produce the fourth signal; multiplying the fourth signal and a seventh signal to produce an eighth signal; subtracting the eighth signal from a constant to produce a ninth signal; multiplying the ninth signal and the seventh signal to produce the second signal; and, delaying the second signal to produce the seventh signal, wherein both the fourth signal and the sixth signal are approximations to the square root of the first signal, and wherein both the second signal and the seventh signal are approximations to the reciprocal of the square root of the first signal. dr

BRIEF DESCRIPTION OF THE DRAWINGS

[0009] These and other features and advantages will become more apparent from a detailed consideration of the invention when taken in conjunction with the drawings in which:

[0010]FIG. 1 shows an exemplary operating environment for the square root extractor of the present invention; and,

[0011]FIG. 2 shows a square root extractor according to one embodiment of the present invention.

DETAILED DESCRIPTION

[0012] As shown in FIG. 1, a linear digital controller 10 generates a signal on an output 12. As is typical, the signal on the output 12 from the linear digital controller 10 may be used to drive an instrument whose response is proportional to this signal. Thus, after digital-to-analog conversion by a digital-to-analog converter 14, this signal can be used directly in many typical linear-control applications. However, if the signal on the output 12 is to be used to drive an instrument 16 whose internal physics provide a responsive force within the instrument that is proportional to the square of the magnitude of the signal on the output 12, a square root extractor 18 is interposed between the linear digital controller 10 and the digital-to-analog converter 14, as shown in FIG. 1. The square root extractor 18 produces a signal on its output 20 that is an approximation of the square root of the magnitude of the signal on the output 12 and carrying the sign of the signal on the output 12.

[0013] The square root extractor 18 may be implemented in accordance with the following mathematical analysis. The magnitude of the signal on the output 12 of the linear digital controller 10 may be defined as |x_(n)| and an approximation of its square root may be defined as u_(n). The choice of an approximation error function determines the mechanization complexity and the speed of convergence provided by the square root extractor 18. However, to simplify mechanization complexity and increase the speed of convergence, the selected approximation error function may be defined in accordance with the following equation:

f(u _(n))=u_(n) ²−|x_(n)|  (1)

[0014] The derivative of f(u_(n)) is then determined in accordance with the following equation:

f′(u _(n))=2u _(n)  (2)

[0015] The zero value for the approximation error function f(u_(n)) may be computed iteratively using the well known Newton-Raphson update formula from elementary calculus. The Newton-Raphson update formula for u is given by the following equation: $\begin{matrix} {u_{n + 1} = {u_{n} - \frac{f\left( u_{n} \right)}{f^{\prime}\left( u_{n} \right)}}} & (3) \end{matrix}$

[0016] Substituting equations (1) and (2) into equation (3) produces the following equation: $\begin{matrix} {u_{n + 1} = {\frac{1}{2}\left( {u_{n} + \frac{x_{n}}{u_{n}}} \right)}} & (4) \end{matrix}$

[0017] In order to avoid a division step, the method disclosed in K. Martin, “Power-Normalized Update Algorithm for Adaptive Filters Without Division,” IEEE ASSP Trans., vol. 37, no. 11, November 1989; pp. 1782-1786 may be used. According to this method, 1/u_(n) can be approximated as v_(n+1). Substituting v_(n+1) for 1/u_(n) in equation (4) produces the following equation: $\begin{matrix} {u_{n + 1} = {\frac{1}{2}\left( {u_{n} + {{x_{n}}v_{n + 1}}} \right)}} & (5) \end{matrix}$

[0018] The approximation error function for v_(n) may be selected in accordance with the following equation: $\begin{matrix} {{g\left( v_{n} \right)} = {u_{n} - \frac{1}{v_{n}}}} & (6) \end{matrix}$

[0019] The derivative of equation (6) is given by the following equation:

g′(v _(n))=v _(n) _(n) ⁻²  (7)

[0020] The Newton-Raphson update formula for v_(n) is given by the following equation: $\begin{matrix} {v_{n + 1} = {v_{n} - \frac{g\left( v_{n} \right)}{g^{\prime}\left( v_{n} \right)}}} & (8) \end{matrix}$

[0021] Substituting equations (6) and (7) into equation (8) produces the following equation:

v _(n+1) v _(n)(2−u _(n) v _(n))  (9)

[0022] It should be noted that equation (9) is the reciprocator according to the K. Martin paper disclosed above.

[0023] Equations (5) and (9) may be implemented as a square root extractor requiring only the simple operations of adding, subtracting, multiplying, and delaying in order to produce an output signal that is the square root of an input signal. Therefore, a square root extractor according to equations (5) and (9) permits the direct use of linear control algorithms to measure observed phenomenon in a simple, straight forward manner.

[0024] Because the operation required by equations (5) and (9) is iterative, there are practical bandwidth restrictions in using a square root extractor according to these equations. However, from arbitrary initial conditions (such as u₀=0 and v₀=0.001), convergence between u_(n), the square root approximation of |x_(n)|, and the actual square root of |x_(n)| within parts per billion is achieved in less than a dozen sample periods. When following a well-behaved signal such as a sinusoid, the tracking error is very small.

[0025]FIG. 2 shows an implementation of the square root extractor 18 in accordance with equations (5) and (9). The signal (x_(n)) on the output 12 of the linear digital controller 10 is coupled to a sign extractor 40 having first and second outputs 42 and 44. The signal on the first output 42 of the sign extractor 40 is the sign of the signal (x_(n)) on the output 12. The signal on the second output 44 of the sign extractor 40 is the magnitude of the signal (x_(n)) on the output 12. That is, the signal on the second output 44 of the sign extractor 40 is the absolute value of the signal (x_(n)) on the output 12. In this regard, the sign extractor 40 may be arranged to complement the signal (x_(n)) and to provide either the signal (x_(n)) or the complement of the signal (x_(n)) on the second output 44 depending on which of the signals (x_(n)) has the positive sign bit.

[0026] The second output 44 is coupled to a first input of a first multiplier 46. The signal from the output of the first multiplier 46 is summed by a first summer 48 with a signal produced by a first one-sample-period-delay element 50. The output from the first summer 48 is scaled by ½ by a scaler 52. The output of the scaler 52 is coupled to an input of the first one-sample-period-delay element 50, and the output of the first one-sample-period-delay element 50 is an approximation of the square root of the magnitude of the signal (x_(n)) on the output 12. The output of the first one-sample-period-delay element 50 is provided to a first input of a sign restorer 54. The sign on the output 42 from the sign extractor 40 is delayed by a second one-sample-period-delay element 56 and is coupled to a second input of the sign restorer 54. The sign restorer 54 merely applies the sign from the second one-sample-period-delay element 56 to the output signal at the output of the first one-sample-period-delay element 50. Thus, the signal provided by the sign restorer 54 on the output 20 is an approximation of the square root of the magnitude of the amplitude of the signal (x_(n)) on the output 12 and has the sign of the signal (x_(n)) on the output 12.

[0027] The output from the first one-sample-period-delay element 50 is further coupled to a first input of a second multiplier 58. The second multiplier 58 produces an output signal which is coupled to a negative input of a second summer 60. A constant k=2 is provided to a positive input of the second summer 60. The second summer 60, accordingly, subtracts the output of the multiplier 58 from the constant k=2. The second summer 60 produces an output signal which is coupled to a first input of a third multiplier 62. The third multiplier 62 produces an output signal which is coupled to a second input of the first multiplier 46. The output signal from the third multiplier 62 is also delayed by a third one-sample-period-delay element 64. The third one-sample-period-delay element 64 provides a signal on an output 66 which is an approximation of the reciprocal of the square root of the signal at the second output 44 from the sign extractor 40. The output 66 is coupled to second inputs of the second multiplier 58 and the third multiplier 62.

[0028] Accordingly, the square root extractor 18 implements equations (5) and (9) to produce an approximation of the square root of the magnitude of the signal on the output 12 from the linear digital controller 10.

[0029] Certain modifications of the present invention will occur to those practicing in the art of the present invention. For example, the square root extractor 18 can be a digital square root extractor, as shown and described above, or the square root extractor 18 can be an analog square root extractor. If the square root extractor 18 is an analog square root extractor, it may be desirable to interpose the square root extractor 18 between the digital-to-analog converter 14 and the instrument 16. Alternatively, the square root extractor 18 having an analog form may be used without the digital-to-analog converter 14 in the case where a linear analog controller is used in place of the linear digital controller 10.

[0030] Accordingly, the description of the present invention is to be construed as illustrative only and is for the purpose of teaching those skilled in the art the best mode of carrying out the invention. The details may be varied substantially without departing from the spirit of the invention, and the exclusive use of all modifications which are within the scope of the appended claims is reserved. 

What is claimed is:
 1. An apparatus comprising: a sign extractor having an input and first and second outputs, wherein the input of the sign extractor receives an input signal, wherein the first output provides a sign of the input signal, and wherein the second output provides a magnitude of the input signal; a delay coupled to the first output, wherein the delay imposes a delay on the sign; a square root extractor coupled to the second output, wherein the square root extractor has an output that provides an output signal, wherein the output signal is an approximation to a square root of the magnitude of the input signal; and, a sign restorer coupled to the output of the square root extractor and to the delay, wherein the sign restorer applies the sign from the delay to the output signal from the square root extractor.
 2. The apparatus of claim 1 wherein the input signal is a digital signal.
 3. The apparatus of claim 2 wherein the input signal is complemented by the sign extractor to produce a signal having a positive sign bit and a signal having a negative sign bit, and wherein the sign extractor selects the signal having the positive sign bit to provide to the second output of the sign extractor.
 4. The apparatus of claim 1 wherein the square root extractor comprises first and second stages.
 5. The apparatus of claim 4 wherein the delay is a first delay, and wherein the first stage comprises: a first multiplier arranged to form a product of the magnitude of the input signal and an approximation of an inverse of the square root of the magnitude of the input signal; a summer arranged to add an output of the first multiplier to an approximation of the square root of the magnitude of the input signal; a scaler arranged to scale an output of the summer substantially by ½; and, a second delay having an input coupled to the output of the scaler, wherein the second delay is arranged to pass the approximation of the square root of the magnitude of the input signal to the summer, and wherein the second delay has an output coupled to an input of the second stage.
 6. The apparatus of claim 5 wherein the second stage comprises: a second multiplier arranged to form a product of the input to the second stage with an output of the second stage; a subtractor arranged to subtract an output of the second multiplier from a constant substantially equal to two; a third multiplier arranged to form a product of an output of the subtractor with the output of the second stage and to provide the approximation of the inverse of the square root of the magnitude of the input signal; and, a third delay coupled to an output of the third multiplier and arranged to provide the output of the second stage.
 7. The apparatus of claim 1 wherein the sign restorer comprises a multiplier, and wherein the multiplier multiplies the output signal from the square root extractor by the sign provided by the first output of the sign extractor.
 8. The apparatus of claim 1 wherein the square root extractor consists of multiplying, summing, scaling, and delaying functions.
 9. The apparatus of claim 1 wherein the delay is a first delay, wherein the square root extractor comprises first, second, and third multipliers, first and second summers, second and third delays, and a scaler, wherein the first multiplier has a first input coupled to the second output of the sign extractor and a second input coupled to an output of the third multiplier, wherein the first summer has a first input coupled to an output of the first multiplier and a second input coupled to an output of the second delay, wherein the scaler has an input coupled to an output of the first summer and an output coupled to an input of the second delay, wherein the second multiplier has a first input coupled to the output of the second delay and a second input coupled to an output of the third delay, wherein the second summer has a first input coupled to an output of the second multiplier and a second input coupled to a constant, wherein the third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the third delay, and wherein the third delay has an input coupled to the output of the third multiplier.
 10. The apparatus of claim 9 wherein the scaler applies a scaling function substantially equal to one-half, and wherein the constant is substantially equal to two.
 11. The apparatus of claim 1 wherein the delay is a first delay, wherein the square root extractor comprises first, second, and third multipliers, first and second summers, second and third delays, and a scaler, wherein the first multiplier has a first input coupled to the second output of the sign extractor and a second input coupled to an output of the third multiplier, wherein the first summer has a first positive input coupled to an output of the first multiplier and a second positive input coupled to an output of the second delay, wherein the scaler has an input coupled to an output of the first summer and an output coupled to an input of the second delay, wherein the second multiplier has a first input coupled to the output of the second delay and a second input coupled to an output of the third delay, wherein the second summer has a negative input coupled to an output of the second multiplier and a positive input coupled to a constant, wherein the third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the third delay, and wherein the third delay has an input coupled to an output of the third multiplier.
 12. The apparatus of claim 11 wherein the scaler applies a scaling function substantially equal to one-half, and wherein the constant is substantially equal to two.
 13. A square root extractor consisting of multiplying, summing, scaling, and delaying functions.
 14. The square root extractor of claim 13 wherein the multiplying function comprises first, second, and third multipliers, wherein the summing function comprises first and second summers, wherein the delaying function comprises first and second delays, wherein the scaling function comprises a scaler, wherein the first multiplier has a first input coupled to receive a signal whose square root is to be extracted and a second input coupled to an output of the third multiplier, wherein the first summer has a first input coupled to an output of the first multiplier and a second input coupled to an output of the first delay, wherein the scaler has an input coupled to an output of the first summer and an output coupled to an input of the first delay, wherein the first delay provides an output of the square root extractor, wherein the second multiplier has a first input coupled to the output of the first delay and a second input coupled to an output of the second delay, wherein the second summer has a first input coupled to an output of the second multiplier and a second input coupled to a constant, wherein the third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the second delay, and wherein the second delay has an input coupled to the output of the third multiplier.
 15. The square root extractor of claim 14 wherein the scaler applies a value substantially equal to one-half, and wherein the constant is substantially equal to two.
 16. The square root extractor of claim 13 wherein the multiplying function comprises first, second, and third multipliers, wherein the summing function comprises first and second summers, wherein the delaying function comprises first and second delays, wherein the scaling function comprises a scaler, wherein the first multiplier has a first input coupled to receive a signal whose square root is to be extracted and a second input coupled to an output of the third multiplier, wherein the first summer has a first positive input coupled to an output of the first multiplier and a second positive input coupled to an output of the first delay, wherein the scaler has an input coupled to an output of the first summer and an output coupled to an input of the first delay, wherein the first delay provides an output of the square root extractor, wherein the second multiplier has a first input coupled to the output of the first delay and a second input coupled to an output of the second delay, wherein the second summer has a negative input coupled to an output of the second multiplier and a positive input coupled to a constant, wherein the third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the second delay, and wherein the second delay has an input coupled to the output of the third multiplier.
 17. The square root extractor of claim 16 wherein the scaler applies a value substantially equal to one-half, and wherein the constant is substantially equal to two.
 18. A square root extractor comprising first, second, and third multipliers, first and second summers, first and second delays, and a scaler, wherein the first multiplier has a first input coupled to receive a signal whose square root is to be extracted and a second input coupled to an output of the third multiplier, wherein the first summer has a first input coupled to an output of the first multiplier and a second input coupled to an output of the first delay, wherein the scaler has an input coupled to an output of the first summer and an output coupled to an input of the first delay, wherein the output of the first delay provides an output of the square root extractor, wherein the second multiplier has a first input coupled to the output of the first delay and a second input coupled to an output of the second delay, wherein the second summer has a first input coupled to an output of the second multiplier and a second input coupled to a constant, wherein the third multiplier has a first input coupled to an output of the second summer and a second input coupled to the output of the second delay, and wherein the second delay has an input coupled to the output of the third multiplier.
 19. The square root extractor of claim 18 wherein the scaler applies a scaling function substantially equal to one-half.
 20. The square root extractor of claim 18 wherein the constant is substantially equal to two.
 21. The square root extractor of claim 20 wherein the scaler applies a scaling function substantially equal to one-half.
 22. The square root extractor of claim 18 wherein the first input of the first summer comprises a first positive input, wherein the second input of the first summer comprises a second positive input, wherein the first input of the second summer comprises a negative input, and wherein the second input of the second summer comprises a positive input.
 23. The square root extractor of claim 22 wherein the scaler applies a scaling function substantially equal to one-half, and wherein the constant is substantially equal to two.
 24. A method comprising: multiplying first and second signals to produce a third signal, wherein the first signal is a signal whose square root is to be extracted; summing the third signal and a fourth signal to produce a fifth signal; scaling the fifth signal to produce a sixth signal; delaying the sixth signal to produce the fourth signal; multiplying the fourth signal and a seventh signal to produce an eighth signal; subtracting the eighth signal from a constant to produce a ninth signal; multiplying the ninth signal and the seventh signal to produce the second signal; and, delaying the second signal to produce the seventh signal, wherein both the fourth signal and the sixth signal are approximations to the square root of the first signal, and wherein both the second signal and the seventh signal are approximations to the reciprocal of the square root of the first signal.
 25. The method of claim 24 further comprising multiplying the fourth signal by a sign.
 26. The method of claim 24 wherein the constant is equal to two, and wherein the scaling of the fifth signal comprises scaling the fifth signal by one-half to produce the sixth signal.
 27. The method of claim 26 further comprising multiplying the fourth signal by a sign. 